<template>
  <stories :list="list"></stories>
</template>

<script>
    import {STORY_LIST} from '../api';
    import stories from '../components/stories';
    export default {
        data(){
            return{
              list:[],
              begin:1,
              end:10,
            }
        },
        methods:{
          getList(){
            const {begin,end} = this;
            this.$http.get(STORY_LIST,{
              begin,
              end,
              activity_id:this.$route.params.activityId
            })
            .then(res =>{
                if(res.data.code ==0){
                  this.list = res.data.data;
                }else{
                  this.$toast.show(res.data.message);
                }
            })
          }
        },
        ready(){
          this.getList();
        },
        components:{
          stories
        }
    }
</script>
<style lang="sass">
  @import "../sass/stories.scss";
</style>
